package com.xql.framework.web;

import com.xql.framework.action.ActionSupport;
import com.xql.framework.model.User;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Created by apple on 15/3/22.
 */
public class LoginAction extends ActionSupport {
    private User user;
    private String sm;
    private int pageNo;
    private Integer size;

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    @Override
    public String execute() {
        return "success";
    }

    public String login(){
        int age = user.getAge()+2;
        user.setAge(age);
        System.out.println("user=>"+this.user);
        if(sm!=null&&!"yes".equals(sm)&&pageNo!=0){
            return "input";
        }
        return "success";
    }

}
